package com.qf.commons.redis.lock;

import org.redisson.api.RLock;

/**
 * description:
 * author: Ken
 * 公众号：Java架构栈
 */
public class CLockThreadLocal {

    private static ThreadLocal<RLock> rLockThreadLocal = new ThreadLocal<>();

    public static void set(RLock rLock){
        rLockThreadLocal.set(rLock);
    }

    public static RLock get(){
        return rLockThreadLocal.get();
    }

    public static void clean(){
        rLockThreadLocal.remove();
    }
}
